/**
 * \file codes.h
 * \brief Codes defined should be used as adequate return values in all
 * RScript functions.
 **/

#ifndef R_CODES_H
#define R_CODES_H

/**
 * What follows is a list of return values (status codes).
 **/

/* Requested operation completed successfully */
#define R_SUCCESS               0

/* The given UTF-8 encoded data is in a middle of a codepoint, seek forward or
 * backward to resolve.*/
#define R_UTF8_SEEK             1

/* The given UTF-8 encoded data is invalid. It does not correspond to any
 * valid UTF-8 octet sequence. Try skipping ahead. Alternately, the given
 * uni_char is outside valid Unicode range. */
#define R_UTF8_INVALID          2

/* To read or write the given unicode point, the buffer must be expanded. */
#define R_UTF8_LIMITED          3

/* Allocating additional memory failed. */
#define R_NO_MEM                4

/* Resource you attempted to access doesn't exist. */
#define R_RESOURCE_DOESNT_EXIST 5

/* Cannot open resource. */
#define R_CANT_OPEN_RESOURCE    6

/* Error in I/O */
#define R_IO_ERROR              7

#endif /* R_CODES_H */
